#Why does 0.8 - 0.7 not give me a precise answer?
>>> 0.8-0.7
0.10000000000000009

#The inaccuracy comes because we are representing floats as a binary. This following example is two functions that convert from float to binary and should clearly illustrate what is really going on behind the scenes. (Code comes from https://stackoverflow.com/questions/53538504/float-to-binary-and-binary-to-float-in-python)

import struct
def float_to_bin(num):
    return format(struct.unpack('!I', struct.pack('!f', num))[0], '032b')
def bin_to_float(binary):
    return struct.unpack('!f',struct.pack('!I', int(binary, 2)))[0]

# How is 0.8 represented as a binary?
>>> float_to_bin(0.8)
'00111111010011001100110011001101'

#This is not 100% accurate (just a best approximation)
#We can see this if we convert back again...
>>> bin_to_float('00111111010011001100110011001101')
0.800000011920929